package com.wsit.mapper;

import com.wsit.pojo.Order;
import com.wsit.pojo.OrderPage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper {


    List<Order> list(OrderPage orderPage);

    @Insert("insert into dog_order( user_id, dog_qz_ID, create_time, status) VALUES (#{userId},#{dogQzID},#{createTime},#{status})")
    void add(Order order);

    @Select("select id, user_id, dog_qz_ID, create_time, status from dog_order where id = #{id}")
    Order getById(Integer id);

    @Insert("update dog_order set user_id = #{userId}, dog_qz_ID = #{dogQzID}, create_time = #{createTime}, status = #{status} where id = #{id}")
    void update(Order order);
}
